from django.db import models


class UserModel(models.Model):
    user_id = models.AutoField(primary_key=True, verbose_name='用户编号')
    user_tel = models.CharField(max_length=11, unique=True, verbose_name='手机号码', null=False)  # 名称
    password = models.CharField(max_length=12, verbose_name='用户密码', null=True, blank=True)  # 密码

    user_name = models.CharField(max_length=12, unique=False, verbose_name='用户名称', blank=True)  # 名称
    user_real_name = models.CharField(max_length=4, unique=False, verbose_name='用户真实名称', blank=True)  # 名称

    email = models.CharField(max_length=64, unique=False, verbose_name='用户邮箱', blank=True)  # 邮箱
    id_card_num = models.CharField(max_length=64, unique=False, verbose_name='用户邮箱', blank=True)  # 邮箱

    sex = models.BooleanField(default=True, blank=True)  # 性别 False 代表女
    ctrip_account = models.CharField(max_length=32, unique=True, verbose_name='账号名称', blank=True)
    ctrip_password = models.CharField(max_length=256, verbose_name='携程密码', blank=True)  # 密码

    # icon = models.ImageField(upload_to='icons', blank=True)  # 头像
    is_delete = models.BooleanField(default=False, blank=True)  # 是否删除

    class Meta:
        db_table = 'users'
        verbose_name_plural = '用户'
        verbose_name = '用户'
